package cn.szsys.integration.controller;

import cn.szsys.integration.dto.TwoElementsDTO;
import cn.szsys.integration.helper.BusinessBeanNameConstant;
import cn.szsys.integration.helper.manager.TwoElementsForwardHandlerChainManager;
import cn.szsys.integration.util.R;
import lombok.RequiredArgsConstructor;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

/**
 * @author Ryan
 * @since 2025-05-09
 **/
@RestController
@RequestMapping("/sf")
@RequiredArgsConstructor
public class TwoElementsController {

    private final TwoElementsForwardHandlerChainManager twoElementsForwardHandlerChainManager;

    @PostMapping("/rz")
    @ResponseBody
    public R renZheng(@RequestBody @Validated TwoElementsDTO dto) {
        //tianqushuzi  证件二要素核验B1.0
        return twoElementsForwardHandlerChainManager.handler(dto, BusinessBeanNameConstant.TwoElements.TQSZ_ELEMENTS_HANDLER_CHAIN);
    }
}
